<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>The small3d library: Model.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo_s.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">The small3d library
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1bbf6a76ff8eaf46cd48acba40dce3d2.html">small3d</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Model.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_model_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#ifndef SMALL3D_OPENGL</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;vulkan/vulkan.h&gt;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#define GLM_FORCE_RADIANS</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &lt;glm/glm.hpp&gt;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &lt;glm/gtx/quaternion.hpp&gt;</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_image_8hpp.html">Image.hpp</a>&quot;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_file_8hpp.html">File.hpp</a>&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacesmall3d.html">small3d</a> {</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html">   34</a></span>&#160;  <span class="keyword">class </span><a class="code" href="classsmall3d_1_1_model.html">Model</a> {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="keyword">private</span>:</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#ifndef SMALL3D_OPENGL</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keywordtype">bool</span> alreadyInGPU = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    VkBuffer positionBuffer = 0;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    VkDeviceMemory positionBufferMemory = 0;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    VkBuffer indexBuffer = 0;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    VkDeviceMemory indexBufferMemory = 0;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    VkBuffer normalsBuffer = 0;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    VkDeviceMemory normalsBufferMemory = 0;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    VkBuffer uvBuffer = 0;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    VkDeviceMemory uvBufferMemory = 0;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    uint32_t placementMemIndex = 0;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    uint32_t colourMemIndex = 0;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    VkBuffer jointBuffer = 0;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    VkDeviceMemory jointBufferMemory = 0;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    VkBuffer weightBuffer = 0;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    VkDeviceMemory weightBufferMemory = 0;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordtype">bool</span> perspective = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <span class="comment">// Name of the texture the model will be rendered with. The texture has to</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="comment">// have been previously generated with Renderer.generateTexture().</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    std::string textureName = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    uint32_t positionBufferObjectId = 0;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    uint32_t indexBufferObjectId = 0;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    uint32_t normalsBufferObjectId = 0;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    uint32_t uvBufferObjectId = 0;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    uint32_t jointBufferObjectId = 0;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    uint32_t weightBufferObjectId = 0;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    uint64_t numPoses = 0;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    uint32_t currentPose = 0;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="comment">// Original transformation matrix (from armature/skin),</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="comment">// as read from a file</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    glm::mat4 origTransformation = glm::mat4(1.0f);</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="comment">// Original rotation (from armature/skin), as read from a</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="comment">// file (in quaternion form)</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    glm::quat origRotation = glm::quat(1.0f, 0.0f, 0.0f, 0.0f);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="comment">// Original scale, as read from a file</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    glm::vec3 origScale = glm::vec3(1.0f, 1.0f, 1.0f);</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="comment">// brief Original translation, as read from a file</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    glm::vec3 origTranslation = glm::vec3(0.0f, 0.0f, 0.0f);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="structsmall3d_1_1_model_1_1_joint.html">   91</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structsmall3d_1_1_model_1_1_joint.html">Joint</a> {</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;      uint32_t node = 0;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;      std::string name;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;      glm::mat4 inverseBindMatrix = glm::mat4(1.0f);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      glm::quat rotation = glm::quat(0.0f, 0.0f, 0.0f, 1.0f);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;      glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;      glm::vec3 translation = glm::vec3(0.0f, 0.0f, 0.0f);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;      glm::quat currRotation = glm::quat(0.0f, 0.0f, 0.0f, 1.0f);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;      glm::vec3 currTranslation = glm::vec3(0.0f, 0.0f, 0.0f);</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;      std::vector&lt;uint32_t&gt; children;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;      std::vector&lt;glm::quat&gt; rotationAnimation;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;      std::vector&lt;glm::vec3&gt; translationAnimation;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;      std::vector&lt;glm::vec3&gt; scaleAnimation;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;      std::vector&lt;float&gt; animTime;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    };</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#a39352fd779afaef6ee5ef398a0481b31">  110</a></span>&#160;    glm::vec3 <a class="code" href="classsmall3d_1_1_model.html#a39352fd779afaef6ee5ef398a0481b31">scale</a> = glm::vec3(1.0f, 1.0f, 1.0f);</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#ad2b52d176f49562bca07f9b238b84854">  116</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint32_t <a class="code" href="classsmall3d_1_1_model.html#ad2b52d176f49562bca07f9b238b84854">MAX_JOINTS_SUPPORTED</a> = 16;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#ae0c58e6b9ead5c0ba861d12425a73038">  122</a></span>&#160;    std::shared_ptr&lt;Image&gt; <a class="code" href="classsmall3d_1_1_model.html#ae0c58e6b9ead5c0ba861d12425a73038">defaultTextureImage</a>;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#adf9422b7594956d857bc9da9da7b13e4">  129</a></span>&#160;    std::vector&lt;float&gt; <a class="code" href="classsmall3d_1_1_model.html#adf9422b7594956d857bc9da9da7b13e4">vertexData</a>;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#a06b724ca272d632f25098e25ab0137a4">  134</a></span>&#160;    uint32_t <a class="code" href="classsmall3d_1_1_model.html#a06b724ca272d632f25098e25ab0137a4">vertexDataByteSize</a> = 0;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160; </div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#affb0aba31845367125ed2008e12f1cac">  141</a></span>&#160;    std::vector&lt;uint32_t&gt; <a class="code" href="classsmall3d_1_1_model.html#affb0aba31845367125ed2008e12f1cac">indexData</a>;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#a85d48b3995956a4ee42dc8c34b195ad7">  146</a></span>&#160;    uint32_t <a class="code" href="classsmall3d_1_1_model.html#a85d48b3995956a4ee42dc8c34b195ad7">indexDataByteSize</a> = 0;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#aa9e45810ced27f9336e2e77bca2f8ba6">  154</a></span>&#160;    std::vector&lt;float&gt; <a class="code" href="classsmall3d_1_1_model.html#aa9e45810ced27f9336e2e77bca2f8ba6">normalsData</a>;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#ab62bf9713060f68517cb7ec34186e884">  159</a></span>&#160;    uint32_t <a class="code" href="classsmall3d_1_1_model.html#ab62bf9713060f68517cb7ec34186e884">normalsDataByteSize</a> = 0;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#a3dc1c38f06ad7bd19126933197e7b443">  167</a></span>&#160;    std::vector&lt;float&gt; <a class="code" href="classsmall3d_1_1_model.html#a3dc1c38f06ad7bd19126933197e7b443">textureCoordsData</a>;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#a3351123ddee47d7b81b9a020ca828061">  172</a></span>&#160;    uint32_t <a class="code" href="classsmall3d_1_1_model.html#a3351123ddee47d7b81b9a020ca828061">textureCoordsDataByteSize</a> = 0;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160; </div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#aa75d379c3808bfce41889f918656b87f">  178</a></span>&#160;    std::vector&lt;uint8_t&gt; <a class="code" href="classsmall3d_1_1_model.html#aa75d379c3808bfce41889f918656b87f">jointData</a>;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#a6ed04786c848d0ef209c80973dfa26e2">  183</a></span>&#160;    uint32_t <a class="code" href="classsmall3d_1_1_model.html#a6ed04786c848d0ef209c80973dfa26e2">jointDataByteSize</a> = 0;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#a41ca4152abcc719e9048258925999f10">  189</a></span>&#160;    std::vector&lt;float&gt; <a class="code" href="classsmall3d_1_1_model.html#a41ca4152abcc719e9048258925999f10">weightData</a>;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160; </div>
<div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#a0f8f0d5bf988d89b3cf7c6c16bc2871e">  194</a></span>&#160;    uint32_t <a class="code" href="classsmall3d_1_1_model.html#a0f8f0d5bf988d89b3cf7c6c16bc2871e">weightDataByteSize</a> = 0;</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="classsmall3d_1_1_model.html#ab90cce419400675c73e1196cdcb679d8">  199</a></span>&#160;    std::vector&lt;Joint&gt; <a class="code" href="classsmall3d_1_1_model.html#ab90cce419400675c73e1196cdcb679d8">joints</a>;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160; </div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <a class="code" href="classsmall3d_1_1_model.html#aa116b5b0c66b9e7f4dfd401ab5233a79">Model</a>();</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160; </div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <a class="code" href="classsmall3d_1_1_model.html#aa116b5b0c66b9e7f4dfd401ab5233a79">Model</a>(<a class="code" href="classsmall3d_1_1_file.html">File</a>&amp; file, <span class="keyword">const</span> std::string&amp; meshName);</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160; </div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    <a class="code" href="classsmall3d_1_1_model.html#aa116b5b0c66b9e7f4dfd401ab5233a79">Model</a>(<a class="code" href="classsmall3d_1_1_file.html">File</a>&amp;&amp; file, <span class="keyword">const</span> std::string&amp; meshName);</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160; </div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    uint32_t <a class="code" href="classsmall3d_1_1_model.html#a5d501a1d394c08b7666a48d55736a5ab">getCurrentPoseIdx</a>();</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160; </div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classsmall3d_1_1_model.html#a570d9db18d28fc5128812d0890881509">animate</a>();</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    glm::mat4 <a class="code" href="classsmall3d_1_1_model.html#a7a80b1e60717a21ef51034f7f95751df">getJointTransform</a>(<span class="keywordtype">size_t</span> jointIdx);</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160; </div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classsmall3d_1_1_glb_file.html">GlbFile</a>;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classsmall3d_1_1_renderer.html">Renderer</a>;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160; </div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;  };</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasssmall3d_1_1_model_html_aa9e45810ced27f9336e2e77bca2f8ba6"><div class="ttname"><a href="classsmall3d_1_1_model.html#aa9e45810ced27f9336e2e77bca2f8ba6">small3d::Model::normalsData</a></div><div class="ttdeci">std::vector&lt; float &gt; normalsData</div><div class="ttdoc">Array, to be treated as a 3 column table. Each &quot;row&quot; contains the x, y and z components of the vector...</div><div class="ttdef"><b>Definition:</b> Model.hpp:154</div></div>
<div class="ttc" id="aclasssmall3d_1_1_glb_file_html"><div class="ttname"><a href="classsmall3d_1_1_glb_file.html">small3d::GlbFile</a></div><div class="ttdoc">.glb (glTF) file parser class</div><div class="ttdef"><b>Definition:</b> GlbFile.hpp:30</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_aa75d379c3808bfce41889f918656b87f"><div class="ttname"><a href="classsmall3d_1_1_model.html#aa75d379c3808bfce41889f918656b87f">small3d::Model::jointData</a></div><div class="ttdeci">std::vector&lt; uint8_t &gt; jointData</div><div class="ttdoc">Array, to be treated as a 4 column table. Each &quot;row&quot; potentially contains up to 4 joints that can inf...</div><div class="ttdef"><b>Definition:</b> Model.hpp:178</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_aa116b5b0c66b9e7f4dfd401ab5233a79"><div class="ttname"><a href="classsmall3d_1_1_model.html#aa116b5b0c66b9e7f4dfd401ab5233a79">small3d::Model::Model</a></div><div class="ttdeci">Model()</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition:</b> Model.cpp:21</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_ad2b52d176f49562bca07f9b238b84854"><div class="ttname"><a href="classsmall3d_1_1_model.html#ad2b52d176f49562bca07f9b238b84854">small3d::Model::MAX_JOINTS_SUPPORTED</a></div><div class="ttdeci">static const uint32_t MAX_JOINTS_SUPPORTED</div><div class="ttdoc">Maximum number of supported joints.</div><div class="ttdef"><b>Definition:</b> Model.hpp:116</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a7a80b1e60717a21ef51034f7f95751df"><div class="ttname"><a href="classsmall3d_1_1_model.html#a7a80b1e60717a21ef51034f7f95751df">small3d::Model::getJointTransform</a></div><div class="ttdeci">glm::mat4 getJointTransform(size_t jointIdx)</div><div class="ttdoc">Get a joint transform, also calculating the transorms of the parent joints in the same tree and the a...</div><div class="ttdef"><b>Definition:</b> Model.cpp:53</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html"><div class="ttname"><a href="classsmall3d_1_1_model.html">small3d::Model</a></div><div class="ttdoc">A 3D model. It can be loaded from a WavefrontFile or GlbFile. It can also be constructed procedurally...</div><div class="ttdef"><b>Definition:</b> Model.hpp:34</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a41ca4152abcc719e9048258925999f10"><div class="ttname"><a href="classsmall3d_1_1_model.html#a41ca4152abcc719e9048258925999f10">small3d::Model::weightData</a></div><div class="ttdeci">std::vector&lt; float &gt; weightData</div><div class="ttdoc">Array, to be treated as a 4 column table. Each &quot;row&quot; contains the weights by which each of the corres...</div><div class="ttdef"><b>Definition:</b> Model.hpp:189</div></div>
<div class="ttc" id="astructsmall3d_1_1_model_1_1_joint_html"><div class="ttname"><a href="structsmall3d_1_1_model_1_1_joint.html">small3d::Model::Joint</a></div><div class="ttdoc">animation joint</div><div class="ttdef"><b>Definition:</b> Model.hpp:91</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a3351123ddee47d7b81b9a020ca828061"><div class="ttname"><a href="classsmall3d_1_1_model.html#a3351123ddee47d7b81b9a020ca828061">small3d::Model::textureCoordsDataByteSize</a></div><div class="ttdeci">uint32_t textureCoordsDataByteSize</div><div class="ttdoc">Size of the texture coordinates data, in bytes.</div><div class="ttdef"><b>Definition:</b> Model.hpp:172</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_affb0aba31845367125ed2008e12f1cac"><div class="ttname"><a href="classsmall3d_1_1_model.html#affb0aba31845367125ed2008e12f1cac">small3d::Model::indexData</a></div><div class="ttdeci">std::vector&lt; uint32_t &gt; indexData</div><div class="ttdoc">3 column table. Each element refers to a &quot;row&quot; in the vertex data table. Each &quot;row&quot; in the index data...</div><div class="ttdef"><b>Definition:</b> Model.hpp:141</div></div>
<div class="ttc" id="a_image_8hpp_html"><div class="ttname"><a href="_image_8hpp.html">Image.hpp</a></div><div class="ttdoc">Image loading and manipulation.</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a5d501a1d394c08b7666a48d55736a5ab"><div class="ttname"><a href="classsmall3d_1_1_model.html#a5d501a1d394c08b7666a48d55736a5ab">small3d::Model::getCurrentPoseIdx</a></div><div class="ttdeci">uint32_t getCurrentPoseIdx()</div><div class="ttdoc">Get the index of the current animation pose.</div><div class="ttdef"><b>Definition:</b> Model.cpp:32</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a06b724ca272d632f25098e25ab0137a4"><div class="ttname"><a href="classsmall3d_1_1_model.html#a06b724ca272d632f25098e25ab0137a4">small3d::Model::vertexDataByteSize</a></div><div class="ttdeci">uint32_t vertexDataByteSize</div><div class="ttdoc">Size of the vertex data, in bytes.</div><div class="ttdef"><b>Definition:</b> Model.hpp:134</div></div>
<div class="ttc" id="aclasssmall3d_1_1_renderer_html"><div class="ttname"><a href="classsmall3d_1_1_renderer.html">small3d::Renderer</a></div><div class="ttdoc">The renderer (Vulkan)</div><div class="ttdef"><b>Definition:</b> Renderer.hpp:84</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a39352fd779afaef6ee5ef398a0481b31"><div class="ttname"><a href="classsmall3d_1_1_model.html#a39352fd779afaef6ee5ef398a0481b31">small3d::Model::scale</a></div><div class="ttdeci">glm::vec3 scale</div><div class="ttdoc">Use this to scale the model and not origScale.</div><div class="ttdef"><b>Definition:</b> Model.hpp:110</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_ae0c58e6b9ead5c0ba861d12425a73038"><div class="ttname"><a href="classsmall3d_1_1_model.html#ae0c58e6b9ead5c0ba861d12425a73038">small3d::Model::defaultTextureImage</a></div><div class="ttdeci">std::shared_ptr&lt; Image &gt; defaultTextureImage</div><div class="ttdoc">Image found in the file the model was loaded from (empty image if not - check the size)....</div><div class="ttdef"><b>Definition:</b> Model.hpp:122</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_adf9422b7594956d857bc9da9da7b13e4"><div class="ttname"><a href="classsmall3d_1_1_model.html#adf9422b7594956d857bc9da9da7b13e4">small3d::Model::vertexData</a></div><div class="ttdeci">std::vector&lt; float &gt; vertexData</div><div class="ttdoc">The vertex data. This is an array, which is to be treated as a 4 column table, holding the x,...</div><div class="ttdef"><b>Definition:</b> Model.hpp:129</div></div>
<div class="ttc" id="a_file_8hpp_html"><div class="ttname"><a href="_file_8hpp.html">File.hpp</a></div><div class="ttdoc">File parser virtual class.</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a6ed04786c848d0ef209c80973dfa26e2"><div class="ttname"><a href="classsmall3d_1_1_model.html#a6ed04786c848d0ef209c80973dfa26e2">small3d::Model::jointDataByteSize</a></div><div class="ttdeci">uint32_t jointDataByteSize</div><div class="ttdoc">Size of the joint data, in bytes.</div><div class="ttdef"><b>Definition:</b> Model.hpp:183</div></div>
<div class="ttc" id="anamespacesmall3d_html"><div class="ttname"><a href="namespacesmall3d.html">small3d</a></div><div class="ttdef"><b>Definition:</b> BoundingBoxSet.hpp:19</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a85d48b3995956a4ee42dc8c34b195ad7"><div class="ttname"><a href="classsmall3d_1_1_model.html#a85d48b3995956a4ee42dc8c34b195ad7">small3d::Model::indexDataByteSize</a></div><div class="ttdeci">uint32_t indexDataByteSize</div><div class="ttdoc">Size of the index data, in bytes.</div><div class="ttdef"><b>Definition:</b> Model.hpp:146</div></div>
<div class="ttc" id="aclasssmall3d_1_1_file_html"><div class="ttname"><a href="classsmall3d_1_1_file.html">small3d::File</a></div><div class="ttdoc">Abstract file parser class.</div><div class="ttdef"><b>Definition:</b> File.hpp:23</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_ab90cce419400675c73e1196cdcb679d8"><div class="ttname"><a href="classsmall3d_1_1_model.html#ab90cce419400675c73e1196cdcb679d8">small3d::Model::joints</a></div><div class="ttdeci">std::vector&lt; Joint &gt; joints</div><div class="ttdoc">The model's joints.</div><div class="ttdef"><b>Definition:</b> Model.hpp:199</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a3dc1c38f06ad7bd19126933197e7b443"><div class="ttname"><a href="classsmall3d_1_1_model.html#a3dc1c38f06ad7bd19126933197e7b443">small3d::Model::textureCoordsData</a></div><div class="ttdeci">std::vector&lt; float &gt; textureCoordsData</div><div class="ttdoc">Array, to be treated as a 2 column table. Each &quot;row&quot; contains the x and y components of the pixel coo...</div><div class="ttdef"><b>Definition:</b> Model.hpp:167</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a570d9db18d28fc5128812d0890881509"><div class="ttname"><a href="classsmall3d_1_1_model.html#a570d9db18d28fc5128812d0890881509">small3d::Model::animate</a></div><div class="ttdeci">void animate()</div><div class="ttdoc">Advance joint animation pose (if joints are animated)</div><div class="ttdef"><b>Definition:</b> Model.cpp:36</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_ab62bf9713060f68517cb7ec34186e884"><div class="ttname"><a href="classsmall3d_1_1_model.html#ab62bf9713060f68517cb7ec34186e884">small3d::Model::normalsDataByteSize</a></div><div class="ttdeci">uint32_t normalsDataByteSize</div><div class="ttdoc">Size of the normals data, in bytes.</div><div class="ttdef"><b>Definition:</b> Model.hpp:159</div></div>
<div class="ttc" id="aclasssmall3d_1_1_model_html_a0f8f0d5bf988d89b3cf7c6c16bc2871e"><div class="ttname"><a href="classsmall3d_1_1_model.html#a0f8f0d5bf988d89b3cf7c6c16bc2871e">small3d::Model::weightDataByteSize</a></div><div class="ttdeci">uint32_t weightDataByteSize</div><div class="ttdoc">Size of the weight data, in bytes.</div><div class="ttdef"><b>Definition:</b> Model.hpp:194</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
